package com.campus;

/**
 * @desc:
 * @author: Shoko
 * @date: 2025/3/4
 */
// DataOperator 类，操作 Shape 对象
public class DataOperator {
    private Shape shape;

    public DataOperator(Shape shape) {
        this.shape = shape;
    }

    public double getArea() {
        return shape.getArea(); // 获取面积
    }

    public double getPerimeter() {
        return shape.getPerimeter(); // 获取周长
    }
}
